﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using CH.Easy.UI.Common;
using CH.Easy.UI.Repository;
using CH.Easy.Ioc;
using CH.Easy.UI.Domain.ConfigAgg;

namespace CH.Easy.UI.Domain.PageAgg
{
    public class PageFactory
    {
        public static BasePage Create(HttpContext httpContext, SiteConfig siteConfig, int id)
        {

            var pageRepository = IocContainer.Resolve<IPageRepository>();
            return pageRepository.GetByFilter(p => p.ID == id).Create(httpContext, siteConfig);

        }
    }
}
